package com.ruoyi.workflow.service.impl;

import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.workflow.service.SystemService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统服务实现类
 * 这里仅作为示例，实际项目中应该从数据库或其他数据源获取数据
 *
 * @author zhangxingju
 * @date 2025/02/20
 */
@Service
@RequiredArgsConstructor
public class SystemServiceImpl implements SystemService {

    private final ISysDeptService deptService;

    private final ISysUserService userService;

    @Override
    public List getUsers(String name) {
        SysUser user=new SysUser();
        return userService.selectUserList(user);
    }

    @Override
    public List getDepartments() {
        return deptService.selectDeptList(new SysDept());
    }
} 